-
Notifications
You must be signed in to change notification settings - Fork 59
libraries: SPI & Wire Bump to 0.53.1 #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
On Giga, the system will complain loudly if the frequency selected is too low ```<err> spi_ll_stm32: Unsupported frequency 400000Hz, max 120000000Hz, min 937500Hz``` Let's try to keep this at minimum or change when we'll be able to grab the same infor from a macro/API provided by zephyr
…iables resolves #13 And: provides for c) option in zephyrproject-rtos#14 In particular, added another config option (config16) that is initialized at beginTransaction with same settings as config except word size set to 16 instead of 8. Also: updated begin() to call beginTransaction with default SPISettings, and the endTransaction, such that sketches that don't call beginTransaction output at the default settings. Changed the header file private: to protected
The ringbuffer backing storage and the read buffer were the same buffer... memcpy over the same location has some nasty implications TODO: move to more complex APIs (like i2c_transfer) to properly implement stop bit
- Add support for I2C target mode. - Fix buffer overflows, bad return values etc.. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Use the ARG_UNUSED macro provided by Zephyr to mark function parameters as intentionally unused to prevent compiler warnings. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Constructors should initialize members in the order they are declared in the class definition. Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
- Arduino_LED_Matrix: fix packed attribute placement, add missing dependency - Camera: fix pixel format check (formats are uint32_t, not pointers) - Ethernet: fix float division literals - SocketWrapper: hide deprecated warnings, fix signed/unsigned compare - Wire: hide pedantic 'invalid offsetof' warning
fcc4e29 to
ba76a67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the Zephyr-based Arduino SPI and Wire implementations to align with the stated library bump (0.53.1), adding new capabilities (notably I2C target-mode callbacks and SPI peripheral-mode configuration).
Changes:
- Reworks
Wirebuffering to use Zephyr ring buffers and adds I2C target-mode callback plumbing viai2c_target_*APIs. - Refactors
SPItransfers to usespi_transceive()and adds configuration for peripheral (slave) mode + 16-bit transfers. - Adjusts global definitions/exports and some compatibility macros.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| libraries/Wire/Wire.h | Adds ring-buffer structs, target callback declarations, and new member state for target mode. |
| libraries/Wire/Wire.cpp | Implements target-mode callbacks and switches RX/TX buffering to Zephyr ring buffers. |
| libraries/SPI/SPI.h | Adds peripheral-mode macro and min clock macro; extends class to support 16-bit config. |
| libraries/SPI/SPI.cpp | Switches to spi_transceive(), adds peripheral-mode handling in transactions, and refactors config setup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.